<template>
	<view class="caseDetail content bgf8">
		<template v-if="info.typeID==1">
			<view class="swiperBox">
				<swiper class="swiper" :autoplay="autoplay" poster="" :interval="interval" :duration="duration">
					<swiper-item v-if="info.reportAttr" v-for="item in info.reportAttr">
						<image :src="item" mode="aspectFit"></image>
					</swiper-item>
				</swiper>
			</view>
		</template>
		<template v-if="info.typeID==2">
			<view class="videoBox" v-for="item in info.reportAttr">
				<video class="video" poster="http://wggl.cqyz.gov.cn/wechat/images/icon/video.jpg" id="myVideo" :src="item" @error="videoErrorCallback" enable-danmu danmu-btn controls></video>
			</view>
		</template>
		<!--  -->
		<view class="card pd45 formBase">
			<template v-if="info.typeID==3">
				<view class="des">
					<view class="label">附件详情：</view>
					<view class="v moreDeitial">
						<!-- #ifdef H5 -->
						<a class="table-btn" :href="item" target='_blank' v-for="item in info.reportAttr">点击下载</a>
						<!-- #endif -->
						<!--	<view @click="downFile(item)" v-for="item in info.reportAttr">{{item}}</view>-->
					</view>
				</view>
			</template>
			<view class="des">
				<view class="label">案件名称：</view>
				<view class="v">{{info.title}}</view>
			</view>
			<view class="des">
				<view class="label">案件类型：</view>
				<view class="v">{{info.typeFirstName}}</view>
			</view>
			<view class="des">
				<view class="label">上报时间：</view>
				<view class="v">{{info.publishTime}}</view>
			</view>
			<view class="des" @click="openMap">
				<view class="label">地理位置：</view>
				<view class="v">{{info.address}}</view>
			</view>
			<view class="des">
				<view class="label">案件描述：</view>
				<view class="v">{{info.reportContent}}</view>
			</view>
			<view class="des" v-if="info.processedContent">
				<view class="label">处置详情：</view>
				<view class="v">{{info.processedContent}}</view>
			</view>
			<template v-if="info.dealTypeID==1">
				<view class="imgUp">
					<view class="imgbox" v-if="info.processedAttr" v-for="(item,ind) in info.processedAttr">
						<image class="i" mode="widthFix" :src="item" @click="moreImg(info.processedAttr,ind)"></image>
					</view>
				</view>
			</template>
			<template v-if="info.dealTypeID==2">
				<view class="videoBox" v-for="item in info.reportAttr">
					<video class="video" poster="http://wggl.cqyz.gov.cn/wechat/images/icon/video.jpg" id="myVideo2" :src="item" @error="videoErrorCallback" enable-danmu danmu-btn controls></video>
				</view>
			</template>
			<template v-if="info.dealTypeID==3">
				<view class="des">
					<view class="label">处置附件：</view>
					<view class="v moreDeitial">
						<!-- #ifdef H5 -->
						<a class="table-btn" :href="item" target='_blank' v-for="item in info.reportAttr">点击下载</a>
						<!-- #endif -->
						<!--	<view @click="downFile(item)" v-for="item in info.reportAttr">{{item}}</view>-->
					</view>
				</view>
			</template>
		</view>
		<!---->
		<template v-if="type==1">
			<template v-if="info.status==1||info.status==4">
				<view class="card formBase">
					<view class="inpBox h300">
						<textarea class="txa" :value="content" data-i="content" @input="inputChange" placeholder-style="color:#cccccc" placeholder="请输入案件处置内容" />
					</view>
					<view class="inpBox">
						<radio-group @change="radioChange">
							<label class="rid" v-for="(item, index) in items">
                        <radio :value="item.value" :checked="item.value == typeId" />  {{item.name}}  </label>
						</radio-group>
					</view>
					<template v-if="typeId">
						<view class="imgUp">
							<div class="imgbox" v-for="(item,ind) in imgArr">
								<image class="i" v-if="typeId==1" mode="widthFix" :src="item"></image>
								<image class="i" v-if="typeId==2" mode="widthFix" src="../../static/img/video.png"></image>
								<image class="i" v-if="typeId==3" mode="widthFix" src="../../static/img/attr.png"></image>
								<uni-icons class="del" type="clear" size="30" @click="delImg(ind)"></uni-icons>
							</div>
							<div class="imgbox up" @tap="choseImg">
								<uni-icons class="icon" type="plusempty" size="70"></uni-icons>
							</div>
						</view>
					</template>
				</view>
				<view class="card btnBox">
					<button class="allBtn btnM" @tap="subMit" :disabled="isDis">{{isDis?'上传中...':'处置'}}</button>
				</view>
			</template>
		</template>
		<view class="card formBase pdb4" v-if="type==2">
			<view class="card btnBox" v-if="info.status==2||info.status==4">
				<button class="twoBtn btnM l" @click="shenghe(1)" :disabled="isDis">审核通过</button>
				<button class="twoBtn btnMi r" @click="shenghe(2)" :disabled="isDis">审核不通过</button>
			</view>

		</view>
	</view>
</template>

<script>
	import caseDetail from './caseDetail.js';
	export default caseDetail;
</script>

<style>

</style>